package com.castlzl.random.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * ZooKeeper全局配置类
 *
 * @author leiziliang
 * @version 1.0
 * @date 2025/2/27 10:10 PM
 */
@Data
@Component
@ConfigurationProperties(prefix = "zookeeper")
public class ZookeeperProperties {

    private String connectString;
    private String namespace = "random-id";
    private String pathPrefix = "leaf/segment/";

    private int sessionTimeoutMs = 60000;
    private int connectionTimeoutMs = 15000;
    private int baseSleepTimeMs = 1000;
    private int maxRetries = 3;
}